home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / BUSINESS / SALE24.ARJ / RLOCK.PRG < prev    next >
Text File  |  1992-06-01  |  995b  |  37 lines

  1. DO CASE
  2.   CASE upper(pb)="EDIT"
  3.     IF RLOCK() 
  4.       ** get a new copy of the record
  5.       SCATTER MEMVAR MEMO 
  6.       ** display the new copy of the record
  7.       SHOW GETS ENABLED
  8.       ** disable any unique key
  9.       SHOW GET m.cu_custid DISABLED
  10.       ** put the cursor in the company field
  11.       _curobj=OBJNUM(m.cu_company)
  12.     ELSE
  13.       DO l2msg WITH "This customer is currently being "+;
  14.         "edited by someone else. Please try again later.",;
  15.         "Ok"
  16.     ENDIF able to lock the record
  17.     ** go back to editing the record
  18.     RETURN .T.
  19.   CASE upper(pb)="SAVE"
  20.     ** save changes to the already locked record
  21.     GATHER MEMVAR MEMO
  22.     UNLOCK
  23.     ** kill the other gets
  24.     SHOW GETS DISABLED
  25.     ** give them a push button to work with
  26.     SHOW GET pb ENABLED
  27.   CASE upper(pb)="ABORT"
  28.     UNLOCK
  29.     ** kill the other gets
  30.     SHOW GETS DISABLED
  31.     ** give them a push button to work with
  32.     SHOW GET pb ENABLED
  33. ENDCASE
  34. RETURN .T.    
  35.  
  36.  
  37.